<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "favorite_works".
 *
 * @property integer $favorite_works_id
 * @property integer $works_id
 * @property integer $member_id
 * @property integer $create_time
 */
class FavoriteWorks extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'favorite_works';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['works_id', 'member_id'], 'required'],
            [['works_id', 'member_id', 'create_time'], 'integer'],
            ['create_time', 'default', 'value' => $_SERVER['REQUEST_TIME']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'favorite_works_id' => 'Favorite Works ID',
            'works_id' => '蛋糕作品ID',
            'member_id' => '会员ID',
            'create_time' => '创建时间',
        ];
    }
}
